package device

import (
	"jtdevice/api/device/controller"
	"jtdevice/api/device/model"
	"jtdevice/pkg/orm"
	"jtdevice/pkg/router"

	"github.com/gin-gonic/gin"
)

func init() {
	orm.RegisterModel(
		&model.Status{},
		&model.Online{},
		&model.AlarmDet{},
		&model.Alarm{},
		&model.AlarmFile{},
		&model.Capture{},
	)
	router.RegisterAPI("", func(r *gin.RouterGroup) {
		controller.Status{}.Router(r.Group("/status"))
		controller.Online{}.Router(r.Group("/online"))
		controller.Alarm{}.Router(r.Group("/alarm"))
	})
}
